package com.windy.exection;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(TokenException.class)
    public String tokenException(TokenException tokenException){
        return tokenException.getMessage();
    }
}
